package com.tx.logsys.restbean;

/**
 * @ClassName: ErrorCode
 * @Author: ...
 * @Description: 错误码
 * @Date: 2019/7/19 11:01
 * @Version: 1.0
 */
public enum ErrorCode {

    NAME_IS_EXIST(1002, "项目名称已存在"),
    NAME_OR_PASS_ERROR(60204, "用户名或密码错误!"),
    TOKEN_ERROR(1003, "token验证失败");

    private Integer value;
    private String desc;

    ErrorCode(Integer value, String desc) {
        this.setValue(value);
        this.setDesc(desc);
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    @Override
    public String toString() {
        return "[" + this.value + "]" + this.desc;
    }
}
